#include<iostream>
//#include<string>

using namespace std;

int main()
{
    int n;
    bool a,b;
    cin >> n ;

    a = !(n & 1);
    b = (n>4 && n<=12);
    cout << (a&b)  << " "<< (a | b) << " " << (a ^ b) << " " << !(a | b);
    return 0;
}